﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Clinica/MasterPageProgramacion.master" AutoEventWireup="true" CodeFile="wfProgramacionListado.aspx.cs" Inherits="Ventas_wfProgramacionListado" %>

<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentMenuSecundario" Runat="Server">
    <li><a href="wfMedicoListado.aspx" class="">Médico</a></li>
    <li><a href="wfEmpleadoListado.aspx" class="">Empleado</a></li>
    <li><a href="wfTurnoListado.aspx" class="">Turno</a></li>
    <li><a href="wfProgramacionListado.aspx" class="active">Programación</a></li>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ModuleTitleContent" Runat="Server">
    Programación
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentEnlacesRapidos" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="MainContent" Runat="Server">
    <script language="javascript" type="text/javascript">

        function confirmSubmit() {
//            $.prompt('Está seguro de querer eliminar la programación?'
//            , {
//                buttons: { Ok: true, Cancel: false }
//                , prefix: 'cleanblue'
//                , callback: confirmSubmitResult
//            }
//        );
            //            return false;

            pcEliminar.Show();
            
        }

        function confirmSubmitResult() {
//            if (v) //post back if the user clicked OK
                $('#<%= btnAnulacion.ClientID %>').click();
        }    
    </script>
    <ul class="tabs primary">
        <li class="active"><a href="wfProgramacionListado.aspx">Listado de Programaciones Médicas</a></li>
        <li><a href="wfProgramacion.aspx">Registrar Programación Médica</a></li>
    </ul>
    <h4>Listado de Programaciónes Médicas</h4>
    <table width="99%">
        <tr>
            <td>
                <dx:ASPxPanel ID="ASPxPanel1" runat="server" Width="99%">
                    <PanelCollection>
                        <dx:PanelContent ID="PanelContent1" runat="server" SupportsDisabledAttribute="True">
                            <table>
                                <tr>
                                    <td>
                                        <dx:ASPxButton ID="ASPxButton1" runat="server" ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                                            CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                                            Text="Agregar" OnClick="ASPxButton1_Click">
                                        </dx:ASPxButton>
                                    </td>
                                    <%--<td>
                                        <dx:ASPxButton ID="ASPxButton3" runat="server" ClientIDMode="AutoID" 
                                            CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
                                            Native="True" OnClick="ASPxButton3_Click" 
                                            SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Text="Eliminar">
                                        </dx:ASPxButton>
                                    </td>--%>
                                    <td>
                                    <dx:ASPxButton ID="btnAnular" runat="server" AutoPostBack="False" 
                                                ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" 
                                                CssPostfix="PlasticBlue" 
                                                SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" 
                                            Text="Eliminar">
                                                <ClientSideEvents Click="function(s, e) {
	return confirmSubmit();
}" />
                                            </dx:ASPxButton>
                                    </td>
                                    <td>
                                    <asp:Button ID="btnAnulacion" runat="server" BackColor="#99CCFF" Style="display: none;"
                                                Text="Anular" OnClick="btnAnulacion_Click" />
                                    </td>
                                </tr>
                            </table>
                        </dx:PanelContent>
                    </PanelCollection>
                </dx:ASPxPanel>
            </td>
        </tr>
        <tr>
            <td>
                <dx:ASPxGridView ID="dgListadoProg" runat="server" ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                    CssPostfix="PlasticBlue" Width="99%" AutoGenerateColumns="False" 
                    DataSourceID="ObjectDataSource1" KeyFieldName="ID" 
                    ClientInstanceName="dgListadoProg">
                    <Columns>
                          
                        <dx:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0">
                            <HeaderTemplate>
                                <dx:ASPxCheckBox ID="SelectAllCheckBox" runat="server" ToolTip="Marcar/Descmarcar"
                                    ClientSideEvents-CheckedChanged="function(s, e) { dgListadoProg.SelectAllRowsOnPage(s.GetChecked()); }" />
                            </HeaderTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        </dx:GridViewCommandColumn>


                        <dx:GridViewDataTextColumn VisibleIndex="1" FieldName="ID">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn VisibleIndex="3" FieldName="Departamento">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Tipo de Servicio" VisibleIndex="4" 
                            FieldName="Tipo_de_Servicio">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn VisibleIndex="5" FieldName="Medico">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Tipo Programacion" VisibleIndex="6" 
                            FieldName="Tipo_de_Programacion">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Turno" FieldName="TUR_DESCRIPCION" 
                            VisibleIndex="7">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Horario" VisibleIndex="8" 
                            FieldName="HOR_HORARIO">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataDateColumn Caption="Fecha" FieldName="PRM_FECHA" 
                            VisibleIndex="2">
                        </dx:GridViewDataDateColumn>
                    </Columns>
                    <SettingsBehavior AllowFocusedRow="True" AllowSelectByRowClick="True" />
                    <SettingsPager ShowDefaultImages="False">
                        <AllButton Text="All">
                        </AllButton>
                        <NextPageButton Text="Next &gt;">
                        </NextPageButton>
                        <PrevPageButton Text="&lt; Prev">
                        </PrevPageButton>
                    </SettingsPager>
                    <Settings ShowFilterRow="True" ShowGroupPanel="True" />
                    <Images SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css">
                        <LoadingPanelOnStatusBar Url="~/App_Themes/PlasticBlue/GridView/gvLoadingOnStatusBar.gif">
                        </LoadingPanelOnStatusBar>
                        <LoadingPanel Url="~/App_Themes/PlasticBlue/GridView/Loading.gif">
                        </LoadingPanel>
                    </Images>
                    <ImagesFilterControl>
                        <LoadingPanel Url="~/App_Themes/PlasticBlue/Editors/Loading.gif">
                        </LoadingPanel>
                    </ImagesFilterControl>
                    <Styles CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue">
                        <Header ImageSpacing="10px" SortingImageSpacing="10px">
                        </Header>
                    </Styles>
                    <StylesEditors>
                        <CalendarHeader Spacing="11px">
                        </CalendarHeader>
                        <ProgressBar Height="25px">
                        </ProgressBar>
                    </StylesEditors>
                </dx:ASPxGridView>
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                    SelectMethod="listar_Detalle" 
                    TypeName="Negocio.Clases_BL.clsPrm_Programacion_MedicaBL">
                </asp:ObjectDataSource>




                <dx:ASPxPopupControl ID="pcEliminar" runat="server"
                CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
                Modal="True" PopupHorizontalAlign="WindowCenter" 
                PopupVerticalAlign="WindowCenter" 
                SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="420px" 
                AllowDragging="True" AllowResize="True" ClientInstanceName="pcEliminar" 
                DragElement="Window" HeaderText="Eliminar">
                <HeaderImage Url="~/Imagenes/delete2.png" Width="20px">
                </HeaderImage>
                <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
                </LoadingPanelImage>
                <CloseButtonStyle>
                    <Paddings Padding="0px" />
                </CloseButtonStyle>
                <ContentStyle>
                    <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
                </ContentStyle>
                <HeaderStyle>
                <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
                    PaddingTop="4px" />
                </HeaderStyle>




<ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">

<table width="100%">
        <tr>
            <td colspan="2" style="padding:0 0 0 20px;">
                Está seguro de querer eliminar el empleado?<hr />
            </td>
        </tr>
        <tr>
            <td align="right" style="padding:0 20px 0 0;">
                <dx:ASPxButton ID="btnAceptarEliminar" runat="server" AutoPostBack="False" 
                    ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" 
                    CssPostfix="PlasticBlue" 
                    SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Text="Aceptar" 
                    Checked="True">
                    <ClientSideEvents Click="function(s, e) {
	pcEliminar.Hide();
	confirmSubmitResult();    
}" />
                    <CheckedStyle BackColor="#000066" Font-Bold="True" Font-Names="Georgia" 
                        ForeColor="White">
                    </CheckedStyle>
                    <HoverStyle BackColor="#000099" Font-Bold="True" Font-Names="Georgia" 
                        ForeColor="White">
                    </HoverStyle>
                </dx:ASPxButton>
            </td>
            <td align="left" style="padding:0 0 0 20px;">
                <dx:ASPxButton ID="btnCancelarEliminar" runat="server" AutoPostBack="False" 
                    ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" 
                    CssPostfix="PlasticBlue" 
                    SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" 
                    Text="Cancelar" Checked="True">
                    <ClientSideEvents Click="function(s, e) {
	pcEliminar.Hide();
}" />
                    <CheckedStyle BackColor="#000066" Font-Bold="True" Font-Names="Georgia" 
                        ForeColor="White">
                    </CheckedStyle>
                    <HoverStyle BackColor="#000099" Font-Bold="True" Font-Names="Georgia" 
                        ForeColor="White">
                    </HoverStyle>
                </dx:ASPxButton>
            </td>
        </tr>
    </table>

</dx:PopupControlContentControl>
</ContentCollection>




                </dx:ASPxPopupControl>
                <dx:ASPxPopupControl ID="pcMensaje" runat="server"
                CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
                Modal="True" PopupHorizontalAlign="WindowCenter" 
                PopupVerticalAlign="WindowCenter" 
                SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="420px" 
                AllowDragging="True" AllowResize="True" ClientInstanceName="pcMensaje" 
                DragElement="Window" HeaderText="Mensaje">
                <HeaderImage Url="~/Imagenes/iconError.png">
                </HeaderImage>
                <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
                </LoadingPanelImage>
                <CloseButtonStyle>
                    <Paddings Padding="0px" />
                </CloseButtonStyle>
                <ContentStyle>
                    <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
                </ContentStyle>
                <HeaderStyle>
                <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
                    PaddingTop="4px" />
                </HeaderStyle>



<ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
<table width="100%">
        <tr>
           <td style="padding:0 0 0 20px;">
                <dx:ASPxLabel ID="lblMensaje" runat="server">
                </dx:ASPxLabel>
                <hr />
            </td>
        </tr>
        <tr>        
             <td align="center">
                <dx:ASPxButton ID="ASPxButton4" runat="server" AutoPostBack="False" 
                    ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" 
                    CssPostfix="PlasticBlue" 
                    SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Text="Aceptar" 
                    Checked="True">
                    <ClientSideEvents Click="function(s, e) {
	pcMensaje.Hide();   
}" />
                    <CheckedStyle BackColor="#000066" Font-Bold="True" Font-Names="Georgia" 
                        ForeColor="White" Font-Italic="False" Font-Strikeout="False">
                    </CheckedStyle>
                    <HoverStyle BackColor="#000099" Font-Bold="True" Font-Names="Georgia" 
                        ForeColor="White">
                    </HoverStyle>
                </dx:ASPxButton>
            </td>
        </tr>
    </table>


</dx:PopupControlContentControl>
</ContentCollection>



                </dx:ASPxPopupControl>

            </td>
        </tr>
    </table>
</asp:Content>

